home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / misc / emu / atari800_tr.lzh / supercart.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-17  |  2.0 KB  |  135 lines

  1. #include "atari.h"
  2. #include "cpu.h"
  3. #include "mem.h"
  4.  
  5. static char *rcsid = "$Id: supercart.c,v 1.4 1998/02/17 thor,david Exp $";
  6.  
  7. extern int cart_type;
  8.  
  9. int SwapIn0(mtype byte)
  10. {
  11.  
  12.   switch(CartType()) {
  13.   case OSS_SUPERCART:
  14.     ChangeMapping(TRUE,FALSE,FALSE,TRUE);
  15.     break;
  16.   case DB_SUPERCART:
  17.     ChangeMapping(TRUE,FALSE,FALSE,TRUE);
  18.     break;
  19.   }
  20.  
  21.   return FALSE;
  22. }
  23.  
  24. int SwapIn1(mtype byte)
  25. {
  26.  
  27.   switch(CartType()) {
  28.   case DB_SUPERCART:
  29.     ChangeMapping(FALSE,TRUE,FALSE,TRUE);
  30.     break;
  31.   }
  32.  
  33.   return FALSE;
  34. }
  35.  
  36. int SwapIn3(mtype byte)
  37. {
  38.  
  39.   switch(CartType()) {
  40.   case OSS_SUPERCART:
  41.     ChangeMapping(FALSE,FALSE,TRUE,TRUE);
  42.     break;
  43.   }
  44.  
  45.   return FALSE;
  46. }
  47.  
  48. int SwapIn4(mtype byte)
  49. {
  50.  
  51.   switch(CartType()) {
  52.   case OSS_SUPERCART:
  53.     ChangeMapping(FALSE,TRUE,FALSE,TRUE);
  54.     break;
  55.   }
  56.  
  57.   return FALSE;
  58. }
  59.  
  60. int SwapIn6(mtype byte)
  61. {
  62.  
  63.   switch(CartType()) {
  64.   case DB_SUPERCART:
  65.     ChangeMapping(FALSE,FALSE,TRUE,TRUE);
  66.     break;
  67.   }
  68.  
  69.   return FALSE;
  70. }
  71.  
  72. int SwapIn7(mtype byte)
  73. {
  74.  
  75.   switch(CartType()) {
  76.   case OSS_SUPERCART:
  77.     ChangeMapping(FALSE,FALSE,TRUE,TRUE);
  78.     break;
  79.   }
  80.   return FALSE;
  81. }
  82.  
  83. int SwapIn8(mtype byte)
  84. {
  85.  
  86.   switch(CartType()) {
  87.   case OSS_SUPERCART:
  88.     TurnOffCart();
  89.     break;
  90.   case DB_SUPERCART:
  91.     ChangeMapping(TRUE,FALSE,FALSE,TRUE);
  92.     break;
  93.   }
  94.  
  95.   return FALSE;
  96. }
  97.  
  98. int SwapIn9(mtype byte)
  99. {
  100.  
  101.   switch(CartType()) {
  102.   case DB_SUPERCART:
  103.     ChangeMapping(FALSE,TRUE,FALSE,TRUE);
  104.     break;
  105.   }
  106.  
  107.   return FALSE;
  108. }
  109.  
  110. int SwapInE(mtype byte)
  111. {
  112.  
  113.   switch(CartType()) {
  114.   case DB_SUPERCART:
  115.     ChangeMapping(FALSE,FALSE,TRUE,TRUE);
  116.     break;
  117.   }
  118.  
  119.   return FALSE;
  120. }
  121.  
  122. void Init_Super(int argc,char **argv,int base)
  123. {
  124.   SetHW(base+0x0,0xff0f,NULL,&SwapIn0);
  125.   SetHW(base+0x1,0xff0f,NULL,&SwapIn1);
  126.   SetHW(base+0x3,0xff0f,NULL,&SwapIn3);
  127.   SetHW(base+0x4,0xff0f,NULL,&SwapIn4);
  128.   SetHW(base+0x6,0xff0f,NULL,&SwapIn6);
  129.   SetHW(base+0x7,0xff0f,NULL,&SwapIn7);
  130.   SetHW(base+0x8,0xff0f,NULL,&SwapIn8);
  131.   SetHW(base+0x9,0xff0f,NULL,&SwapIn9);
  132.   SetHW(base+0xe,0xff0f,NULL,&SwapInE);
  133. }
  134.  
  135.